package com.fgba.express.data.entity;

import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fgba.express.comm.enums.State;
import com.fgba.express.core.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

/**
 * <p>
 * 快递表
 * </p>
 *
 * @author fgba
 * @since 2022-02-24
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_express")
@ApiModel(value="Express对象", description="快递表")
public class Express extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "快递编号")
    private String number;

    @ApiModelProperty(value = "收件人姓名")
    private String recipient;

    @ApiModelProperty(value = "快递员ID（外键）")
    private Integer courierId;

    @ApiModelProperty(value = "取件码")
    private String code;

    @ApiModelProperty(value = "快递公司，该值参考快递公司表")
    private String company;

    @ApiModelProperty(value = "是否取件")
    private Boolean expressState;

    @ApiModelProperty(value = "入库时间")
    private LocalDateTime inTime;

    @ApiModelProperty(value = "出库时间")
    private LocalDateTime outTime;

    @ApiModelProperty(value = "状态，0为删除，1为正常")
    @TableLogic(value = "1",delval = "0")
    private State state;
}
